package com.jiashihui.web.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author jiashihui
 * @since 2019-01-29
 */
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="dept", description="部门对象")
public class Dept extends Model<Dept> implements Serializable{

    private static final long serialVersionUID = 7356977332401124577L;

    @ApiModelProperty(value="部门ID", name="id", hidden=true)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value="部门名称", name="name", example="部门1", required=true)
    private String name;
    @ApiModelProperty(value="部门描述", name="test", example="描述1")
    private String test;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTest() {
        return test;
    }

    public void setTest(String test) {
        this.test = test;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Dept{" +
        "id=" + id +
        ", name=" + name +
        ", test=" + test +
        "}";
    }
}
